use "Dataset_II_Democratic-sanctions_Aid.dta"

 
tab ccodecow if democratic_sanction==1
tab ccodecow
tab ccodecow if democratic_sanction==1
tab ccodecow if democratic_sanction==1 & EU==1
tab ccodecow if democratic_sanction==1 & US==1
ttest v2x_polyarchy, by(democracy_sanction)
ttest v2x_polyarchy, by(democracy_sanction_01)

sum civil_society_aid
tab ccodecow if democratic_sanction==1 & civil_society_aid>56.6509 & civil_society_aid!=.
sum public_sector_aid
tab ccodecow if democratic_sanction==1 & public_sector_aid>178.3202 & public_sector_aid!=.


corr civil_society_aid_pc public_sector_aid_pc
corr civil_society_aid_pc public_sector_aid_pc if democratic_sanction==1
corr civil_society_aid_pc public_sector_aid_pc if no_aid_dem_sanction==1



ttest public_sector_aid_pc, by(democratic_sanction)
ttest public_sector_aid_pc, by(no_aid_dem_sanction)
ttest civil_society_aid_pc, by(democratic_sanction)
ttest civil_society_aid_pc, by(no_aid_dem_sanction)


corr v2x_polyarchy democratic_sanction civil_society_aid public_sector_aid total_aid_all_channels coup1 conflict one_sided_violence GDPpc_constant_USD_WDI GDP_growth_annual_WDI pop_tot_WDI  
sum v2x_polyarchy democratic_sanction civil_society_aid public_sector_aid total_aid_all_channels coup1 conflict one_sided_violence GDPpc_constant_USD_WDI GDP_growth_annual_WDI pop_tot_WDI 



****Main specificiation: aid per capita

xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)

xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe
est store fixed
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, re
est store random
hausman fixed random


xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)

margins L.democratic_sanction, at(c.L.ln_civil_society_aid = (0(1)4))
marginsplot, name(a, replace)
margins, dydx(L.democratic_sanction) at(c.L.ln_civil_society_aid = (0(1)4))
marginsplot, yline(0) name(b, replace)
addplot: hist ln_civil_society_aid_pc, yaxis(2) yscale(alt axis(2))
graph combine a b, name(c, replace)


margins L.democratic_sanction, at(c.L.ln_public_sector_aid = (0(1)8))
marginsplot, name(d, replace)
margins, dydx(L.democratic_sanction) at(c.L.ln_public_sector_aid = (0(1)8))
marginsplot, yline(0) name(e, replace)
addplot: hist ln_public_sector_aid_pc, yaxis(2) yscale(alt axis(2))
graph combine d e, name(f, replace)


****Second table: no aid sanction and aid per capita


xtreg D.v2x_polyarchy L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)


margins L.no_aid_dem_sanction, at(c.L.ln_civil_society_aid = (0(1)4))
marginsplot, name(a, replace)
margins, dydx(L.no_aid_dem_sanction) at(c.L.ln_civil_society_aid = (0(1)4))
marginsplot, yline(0) name(b, replace)
addplot: hist ln_civil_society_aid_pc, yaxis(2) yscale(alt axis(2))
graph combine a b, name(c, replace)


margins L.no_aid_dem_sanction, at(c.L.ln_public_sector_aid = (0(1)8))
marginsplot, name(d, replace)
margins, dydx(L.no_aid_dem_sanction) at(c.L.ln_public_sector_aid = (0(1)8))
marginsplot, yline(0) name(e, replace)
addplot: hist ln_public_sector_aid_pc, yaxis(2) yscale(alt axis(2))
graph combine d e, name(f, replace)


****Appendix: levels of aid

xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid L.democratic_sanction##c.L.ln_civil_society_aid, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid L.democratic_sanction##c.L.ln_civil_society_aid i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid L.democratic_sanction##c.L.ln_civil_society_aid L.ln_total_aid_all_channels i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid L.democratic_sanction##c.L.ln_civil_society_aid L.ln_total_aid_all_channels coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)


****Appendix: aid per GDP p.c.

xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDPpc L.democratic_sanction##c.L.ln_civil_society_aid_GDPpc, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDPpc L.democratic_sanction##c.L.ln_civil_society_aid_GDPpc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDPpc L.democratic_sanction##c.L.ln_civil_society_aid_GDPpc L.ln_total_aid_GDPpc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDPpc L.democratic_sanction##c.L.ln_civil_society_aid_GDPpc L.ln_total_aid_GDPpc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)


****Appendix: aid per GDP 

xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDP L.democratic_sanction##c.L.ln_civil_society_aid_GDP, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDP L.democratic_sanction##c.L.ln_civil_society_aid_GDP i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDP L.democratic_sanction##c.L.ln_civil_society_aid_GDP L.ln_total_aid_GDP i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democratic_sanction##c.L.ln_public_sector_aid_GDP L.democratic_sanction##c.L.ln_civil_society_aid_GDP L.ln_total_aid_GDP coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)


****Appendix: civil society index  

xtreg D.v2xcs_civil_society_index L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc, fe vce(cluster ccodecow)
xtreg D.v2xcs_civil_society_index L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2xcs_civil_society_index L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2xcs_civil_society_index L.democratic_sanction##c.L.ln_public_sector_aid_pc L.democratic_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)

xtreg D.v2xcs_civil_society_index L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc, fe vce(cluster ccodecow)
xtreg D.v2xcs_civil_society_index L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2xcs_civil_society_index L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2xcs_civil_society_index L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)

xtreg D.v2xcs_civil_society_index L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)
margins, dydx(L.no_aid_dem_sanction) at(c.L.ln_civil_society_aid_pc = (0(1)4)) post

xtreg D.v2xcs_civil_society_index L.no_aid_dem_sanction##c.L.ln_public_sector_aid_pc L.no_aid_dem_sanction##c.L.ln_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population i.year, fe vce(cluster ccodecow)
margins, dydx(L.no_aid_dem_sanction) at(c.L.ln_public_sector_aid_pc = (0(1)7)) post


****Appendix: aid per capita

xtreg D.v2x_polyarchy L.democracy_sanction##c.L.ln_EU_public_sector_aid_pc L.democracy_sanction##c.L.ln_EU_civil_society_aid_pc, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democracy_sanction##c.L.ln_EU_public_sector_aid_pc L.democracy_sanction##c.L.ln_EU_civil_society_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democracy_sanction##c.L.ln_EU_public_sector_aid_pc L.democracy_sanction##c.L.ln_EU_civil_society_aid_pc L.ln_total_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democracy_sanction##c.L.ln_EU_public_sector_aid_pc L.democracy_sanction##c.L.ln_EU_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population L.ln_EU_Trade_Eurostat L.D.ln_EU_Trade_Eurostat i.year, fe vce(cluster ccodecow)

xtreg D.v2x_polyarchy L.democracy_sanction_01##c.L.ln_US_public_sector_aid_pc L.democracy_sanction_01##c.L.ln_US_civil_society_aid_pc, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democracy_sanction_01##c.L.ln_US_public_sector_aid_pc L.democracy_sanction_01##c.L.ln_US_civil_society_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democracy_sanction_01##c.L.ln_US_public_sector_aid_pc L.democracy_sanction_01##c.L.ln_US_civil_society_aid_pc L.ln_total_aid_pc i.year, fe vce(cluster ccodecow)
xtreg D.v2x_polyarchy L.democracy_sanction_01##c.L.ln_US_public_sector_aid_pc L.democracy_sanction_01##c.L.ln_US_civil_society_aid_pc L.ln_total_aid_pc coup1 L.conflict L.one_sided_violence L.ln_GDPpc L.ln_GDPgrowth L.ln_population L.ln_US_Trade_COW L.D.ln_US_Trade_COW i.year, fe vce(cluster ccodecow)
